package GraduateStudent;

public class Graduate implements StudentInterface,TeacherInterface{
    private String name;
    private String sex;
    private int age;
    private int Fee;
    private int Pay;

    @Override
    public void setFee(int Fee) {
        this.Fee=Fee;
    }

    @Override
    public int getFee() {
        return Fee;
    }

    @Override
    public void setPay(int Pay) {
        this.Pay=Pay;
    }

    @Override
    public int getPay() {
        return Pay;
    }
    public void isLoan(){
        int[] a =AnnualIncome();
        System.out.println("年收入" +a[0]+",年学费" +a[1]);
        if (a[0]-a[1]<2000){
            System.out.println("provide a loan");
        }
    }

    public int[] AnnualIncome(){
        int[] a={(getPay()*12),(getFee()*2)};
        return a;
    }
    public Graduate(String name, String sex, int age) {
        this.name = name;
        this.sex = sex;
        this.age = age;
    }

    public Graduate(String name, String sex, int age, int fee, int pay) {
        this.name = name;
        this.sex = sex;
        this.age = age;
        Fee = fee;
        Pay = pay;
    }
}
